<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: udc.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">udc.h</div>  </div>
</div>
<div class="contents">
<a href="udc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00039"></a>00039 <span class="preprocessor">#ifndef _UDC_H_</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define _UDC_H_</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &quot;<a class="code" href="conf__usb_8h.html" title="USB configuration file for CDC application.">conf_usb.h</a>&quot;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &quot;<a class="code" href="usb__protocol_8h.html" title="USB protocol definitions.">usb_protocol.h</a>&quot;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include &quot;<a class="code" href="udc__desc_8h.html" title="Common API for USB Device Interface.">udc_desc.h</a>&quot;</span>
<a name="l00045"></a>00045 <span class="preprocessor">#include &quot;<a class="code" href="udd_8h.html" title="Common API for USB Device Drivers (UDD)">udd.h</a>&quot;</span>
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00153"></a>00153 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> udc_include_vbus_monitoring(<span class="keywordtype">void</span>)
<a name="l00154"></a>00154 {
<a name="l00155"></a>00155         <span class="keywordflow">return</span> <a class="code" href="group__udd__group.html#gaa4cac8c35ae056e26cf4ab5b426bbe09" title="Authorizes the VBUS event.">udd_include_vbus_monitoring</a>();
<a name="l00156"></a>00156 }
<a name="l00157"></a>00157 
<a name="l00158"></a>00158 
<a name="l00161"></a>00161 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> udc_start(<span class="keywordtype">void</span>)
<a name="l00162"></a>00162 {
<a name="l00163"></a>00163         <a class="code" href="group__udd__group.html#ga9792d1899ae058e3984d6a622fe2ad42" title="Enables the USB Device mode.">udd_enable</a>();
<a name="l00164"></a>00164 }
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 
<a name="l00169"></a>00169 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> udc_stop(<span class="keywordtype">void</span>)
<a name="l00170"></a>00170 {
<a name="l00171"></a>00171         <a class="code" href="group__udd__group.html#gab283432057b934e9d73ac9282d9b0f11" title="Disables the USB Device mode.">udd_disable</a>();
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173 
<a name="l00174"></a>00174 
<a name="l00182"></a>00182 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> udc_attach(<span class="keywordtype">void</span>)
<a name="l00183"></a>00183 {
<a name="l00184"></a>00184         <a class="code" href="group__udd__group.html#ga7a7c0d9236c922c2af33c6702565a99f" title="Attach device to the bus when possible.">udd_attach</a>();
<a name="l00185"></a>00185 }
<a name="l00186"></a>00186 
<a name="l00187"></a>00187 
<a name="l00193"></a>00193 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> udc_detach(<span class="keywordtype">void</span>)
<a name="l00194"></a>00194 {
<a name="l00195"></a>00195         <a class="code" href="group__udd__group.html#ga03e59eaa264f1dbe5a52559311d0520e" title="Detaches the device from the bus.">udd_detach</a>();
<a name="l00196"></a>00196 }
<a name="l00197"></a>00197 
<a name="l00198"></a>00198 
<a name="l00201"></a>00201 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> udc_wakeup(<span class="keywordtype">void</span>)
<a name="l00202"></a>00202 {
<a name="l00203"></a>00203         <a class="code" href="group__udd__group.html#ga14ae6068206556d6ae8766b1baa2f686" title="The USB driver sends a resume signal called Upstream Resume.">udd_send_wake_up</a>();
<a name="l00204"></a>00204 }
<a name="l00205"></a>00205 
<a name="l00206"></a>00206 
<a name="l00212"></a>00212 <a class="code" href="structusb__iface__desc__t.html" title="Standard USB interface descriptor structure.">usb_iface_desc_t</a> <a class="code" href="group__udc__desc__group.html#gae086959cec07a2e71ab069e25a51764f" title="Defines the memory&#39;s location of USB descriptors.">UDC_DESC_STORAGE</a> *<a class="code" href="group__udc__group.html#ga7da79665b18d9c63db481ec59987ce66" title="Returns a pointer on the current interface descriptor.">udc_get_interface_desc</a>(<span class="keywordtype">void</span>);
<a name="l00213"></a>00213 
<a name="l00215"></a>00215 
<a name="l00243"></a>00243 
<a name="l00244"></a>00244 
<a name="l00245"></a>00245 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00246"></a>00246 <span class="preprocessor"></span>}
<a name="l00247"></a>00247 <span class="preprocessor">#endif</span>
<a name="l00248"></a>00248 <span class="preprocessor"></span><span class="preprocessor">#endif // _UDC_H_</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:51 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
